<% include ./header.ejs %>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rateYo/2.2.0/jquery.rateyo.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/rateYo/2.2.0/jquery.rateyo.min.js"></script>
<div class="work-page main grid-wrap">

        <header class="grid col-full">
            <hr>
            <p class="fleft"><%=product.title%></p>
        </header>
        <aside class="grid col-one-quarter mq2-col-one-third mq3-col-full">
            <p class="mbottom">
                <%-product.description%>
            </p>
            <%console.log(product)%>

            <%if(product.details){%>
                <h6>工作内容</h6>
                <ul class="halfmbottom">
                    <%product.details.split(",").forEach(function(one,key){%>
                        <li><%-one%></li>
                    <%})%>
                </ul>
            <%}%>


            <%if(product.technology){%>
            <h6>主要技术</h6>
            <ul class="halfmbottom">
                <%product.technology.split(",").forEach(function(one,key){%>
                    <li><%-one%></li>
                <%})%>
            </ul>
            <%}%>

            <%if(product.links){%>
            <h6>预览</h6>
            <ul class="mbottom">
                <%product.links.split(",").forEach(function(one,key){%>
                    <li><a href="<%-one%>"><%-one%></a></li>
                <%})%>
            </ul>
            <%}%>

            <%if(product.testimonial){%>
            <h6>客户评价</h6>
            <blockquote id="rateYo"></blockquote>
            <script type="text/javascript">
$(function () {
 
  $("#rateYo").rateYo({
    starWidth: "15px",
    numStars: 10,
    readOnly: true,
    rating: <%=product.testimonial%>
  });
 
});
            </script>
            <%}%>
        </aside>

        <section class="grid col-three-quarters mq2-col-two-thirds mq3-col-full">
            <h4><%=product.title%></h4>
            <div class="content">
                <p><%-product.content%></p>

                <%if(product.client){%>
                    <h4>客户案例</h4>
                    <p class="halfmbottom">
                        <%-product.client%>
                    </p>
                <%}%>
                <%if(product.thumb){%>
                <img src="<%-product.thumb%>"/>
                <%}%>
            </div>
        </section>  
    </div>
<% include ./footer.ejs %>